#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
class A
{
public:
	A(){}
	virtual void func() {}
	virtual void func2() {}
};

class B :public A
{
	virtual void func() { cout << "B"; }
	virtual void func2(int x) {}

};
int main()
{
	B s1;
	A* s;
	A s2;
	s = &s1;
	s->func();
	return 0;
}
//int main()
//{
//	int* a = new int[10];//int* a
//	a[0] = 1;
//	cout << *a << endl;
//	delete[] a;
//	return 0;
//}
